home *** CD-ROM | disk | FTP | other *** search
- on keyDown
- global WhichBug, TxtCursor, digitalis, changer, singit
- if singit = 0 then
- exit
- end if
- set onesdigit to 42 + WhichBug
- if (the key = RETURN) or (the key = ENTER) then
- if value(changer) = 0 then
- exit
- end if
- set the castNum of sprite onesdigit to getAt(digitalis, value(changer) + 19)
- set TxtCursor to 0
- checkit()
- exit
- else
- if the key = BACKSPACE then
- set monkey to changer
- if the number of chars in monkey > 1 then
- set monkey to char 1 to the number of chars in monkey - 1 of monkey
- set changer to monkey
- else
- set changer to EMPTY
- end if
- else
- if the number of chars in string(changer) < 2 then
- if (the key >= "0") and (the key <= "9") then
- if (changer = "1") and (the key = "0") then
- set changer to "10"
- else
- set changer to the key
- end if
- end if
- end if
- end if
- set the castNum of sprite onesdigit to getAt(digitalis, value(changer) + 1)
- end if
- updateStage()
- end
-